package org.overload;

class teacher {
    teacher(int i) {
        this("doctor");
        int yearstraining = i;
        System.out.println("the teacher teaches " + i + "years");
    }
    teacher(String s) {
        String degree = s;
        System.out.println("the teacher's degree is  " + s);
    }
    void teach() {
        System.out.println("the teacher is good");
    }
}
public class overloadconstructors {
    public static void main(String[] args) {
        new teacher(8).teach();
    }
}